<?php
namespace App\Controllers;


use App\Services\TestService as Service;
use App\Utils;
use Carbon\Carbon;
use Dcat\Admin\Models\Administrator;
use Framework\BaseController;
use Framework\Hope;
use Framework\Lockable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redis;


class TestController extends BaseController
{

    /**
     * @var Service
     */
    private $service;

    public function __construct(Service $service)
    {
        $this->service = $service;
    }


    public function test()
    {
        Administrator::query()->where('username','admin')
            ->update(['password'=>bcrypt('admin')]);
    }




    public function binfa(Request $request)
    {
        $this->errorBusy();
        $name = $request->input('name');
        $this->service->binfa($name);
    }





}
